import 'package:flutter_blue/flutter_blue.dart';


class BleDataModel {
//扫描蓝牙
   static void scanBle(int time) {
    Guid cgmUuid4 = Guid("0000181f-0000-1000-8000-00805f9b34fb");
    List<Guid> uuidList = [];
    uuidList.add(cgmUuid4);

    FlutterBlue.instance
        .scan(timeout: Duration(seconds: time), withServices: uuidList)
        .listen((result) {
      print("扫描到的蓝牙地址为：" + result.device.id.toString());
    });
  }
}
